<template>
  <div>
    <component :is="comp" />
    <component
      v-for="(item, index) in list"
      :key="index"
      :is="item.type"
      v-bind="item.data"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      comp: "headertap",
      list: [],
    };
  },
  created() {
    this.getPageData();
  },
  methods: {
    getPageData() {
      this.fetch("/list").then((res) => {
        this.list = [...this.list, ...res.data];
      });
    },
    onReachBottom() {
      this.getPageData();
    },
  },
};
</script>

<style scoped>
</style>